<?php defined('_JEXEC') or die; ?>

<div class="p10t">
  <form action="<?php echo JRoute::_( 'index.php?option=com_user&task=remindusername' ); ?>" method="post"  id="remindForm">
    <div class="box_pro p10t">
      <div class="tt3">
        <p class="text_tt1">forgot password</p>
      </div>
      <?php
		if(JRequest::getVar('error','0','get' )=='1'){
	?>
      <div class="error">Email not exists</div>
      <?php
		}
	?>
      <div class="p27l p15b p30t box_mail" style="min-height:400px;">
        <label>Firma/navn:</label>
        <input class="txt_mail w322" id="name" name="name" type="text" />
        <br class="cb" />
        <label>Email:</label>
        <input class="txt_mail w322" id="email" name="email" type="text" />
        <br class="cb" />
        <label>&nbsp;</label>
        <a href="javascript:void(0);" class="submit" onclick="click_sendremind();"><img src="templates/xescort/images/bt_send.png" /></a> </div>
    </div>
    {module Ads}
    <input type="submit" name="sendremind" id="sendremind" value="Send" style="display: none;" />
    <?php echo JHTML::_( 'form.token' ); ?>
  </form>
</div>
<div class="center_bt"></div>
<script>
jQuery(document).ready(function(){
	click_sendremind=function(){
		document.getElementById('sendremind').click();
	};
});
jQuery("#remindForm").validate({		
	errorPlacement: function(error, element) {	
		
	},
	invalidHandler: function(form, validator) {
		
	  var errors = validator.numberOfInvalids();
	  if (errors) {			  					
		$('#alert').html(validator['errorList'][0]['message']);
		$('#backoverlay').show();
		$('#show_popup').show();
		$('#f_focus').html(validator['errorList'][0]['element'].name);
		validator['errorList'][0]['element'].focus();
		
	  } else {
		
	  }
	},
	rules: {
		name: "required",
		email: {
			required: true,
			email: true
		}
	},
	messages: {
		name: "Firma/navn skal udfyldes!",
		email : "Email skal udfyldes"
	}
});
</script>
